/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package server;


import engine.Singleton;
import java.io.IOException;
import java.net.ServerSocket;
import java.net.Socket;
import java.util.ArrayList;
import java.util.List;
import java.util.logging.Level;
import java.util.logging.Logger;

/**
 *
 * @author Alexx
 */
public class MultiThreadedServer extends Thread
{
    static final int PORT = 8888;

    
    public static void main(String[] args) throws IOException
    {
        ServerSocket s = new ServerSocket(PORT);
        System.out.println("Server Started");
        Singleton.getInstance();
        try
        {
            while (true)
            {
                Socket socket = s.accept();
                try
                {
                    ServeOneThread clients = new ServeOneThread(socket);
                    
                }
                catch (IOException e)
                {
                    socket.close();
                }
            }
        }
        finally
        {
            s.close();
        }
    }
    
}
